Socket
Socket
Sign inDemoInstall

validate-npm-package-license

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

validate-npm-package-license

Give me a string and I'll tell you if it's a valid npm package license string


Version published
Weekly downloads
23M
decreased by-2.7%
Maintainers
2
Weekly downloads
 
Created

What is validate-npm-package-license?

The validate-npm-package-license package is used to validate and parse license identifiers based on the SPDX license list. It helps ensure that package licenses are valid and SPDX-compliant, which is important for legal compliance and software distribution.

What are validate-npm-package-license's main functionalities?

License Validation

This feature allows you to validate a string to check if it's a valid SPDX license expression. The code sample demonstrates how to validate the 'MIT' license identifier.

"use strict";\nconst validate = require('validate-npm-package-license');\nconst result = validate('MIT');\nconsole.log(result);

License Parsing

This feature enables parsing of complex SPDX license expressions, such as dual licenses. The code sample shows how to parse and validate a compound license expression that includes both 'MIT' and 'Apache-2.0' licenses.

"use strict";\nconst validate = require('validate-npm-package-license');\nconst result = validate('(MIT OR Apache-2.0)');\nconsole.log(result);

Other packages similar to validate-npm-package-license

Keywords

FAQs

Package last updated on 19 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc